package algorithm.poj.p3000;

import java.io.BufferedReader;
import java.io.File;
import java.io.FileInputStream;
import java.io.InputStream;
import java.io.InputStreamReader;
import java.net.URL;
import java.net.URLDecoder;

public class P3086 {

	public static void main(String[] args) throws Exception {

		InputStream input = null;
		if (false) {
			input = System.in;
		} else {
			URL url = P3086.class.getResource("P3086.txt");
			File file = new File(URLDecoder.decode(url.getPath(), "UTF-8"));
			input = new FileInputStream(file);
		}
		
		BufferedReader stdin = new BufferedReader(new InputStreamReader(input));

		String line = stdin.readLine();
		int N = Integer.valueOf(line.trim());
		for (int i = 0; i < N; i ++) {
			line = stdin.readLine();
			long n = Integer.valueOf(line.trim());
			long w = (n+3)*(n+2)*(n+1)*n>>3;
			System.out.println((i+1) + " " + n + " " + w);
		}
	}
}